﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace XuaNhapKho.UserControl
{
    public partial class Menu : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["User"] == null)
            {
                Response.Redirect("/Default.aspx");
            }
            else
            {
                DataTable dt = (DataTable)Session["User"];

                foreach (DataRow rows in dt.Rows)
                {
                    ltlHoVaTen.Text = rows["HoVaTen"].ToString();
                    
                }
            }
        }

        protected void lbtnLogout_Click(object sender, EventArgs e)
        {
            Session["User"] = null;
            Response.Redirect("/Default.aspx");
        }
    }
}